<?php
define('IN_ECS', true);

require(dirname(__FILE__).'/includes/init.php');

$user_id = $_SESSION['user_id'];
$action = isset($_REQUEST['act']) ? trim($_REQUEST['act']) : 'default';

$not_login_arr = array('login','act_login','act_register','act_edit_password','get_password','send_pwd_email','password',);
$ui_arr = array('register','login','profile','default');

if(empty($_SESSION['user_id']))
{
	if(!in_array($action, $not_login_arr))
	{
		if(in_array($action, $ui_arr))
		{
			if(!empty($_SERVER['QUERY_STRING']))
			{
				$back_act = 'user.php?'.$_SERVER['QUERY_STRING'];
			}
			$action = 'login';
		}
		else 
		{
			die('非正常提交数据');
		}
	}
}


if($action = 'login')
{
	$smarty->assign('action',$action);
	$smarty->display('user_passport.dwt');
}


